home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 10 / PC Guia 10.iso / database / shared.dir / 01089_Script_nuggetpreparation < prev    next >
Text File  |  1996-03-14  |  1KB  |  62 lines

  1. --on readnuggetsintocast
  2. --  
  3. --  set obj = fileio(mNew,"read", the pathname & "nuggets")
  4. --  set nug = obj(mReadFile)
  5. --  obj(mDispose)
  6. --  
  7. --  set maxnug = 20
  8. --  
  9. --  repeat with i = 1 to 10
  10. --    set the text of field ("makernugget"&i)=""
  11. --  end repeat
  12. --  
  13. --  repeat with i = 1 to 188
  14. --    
  15. --    set the itemdelimiter = "@"
  16. --    
  17. --    set tmp = item i of nug
  18. --    put tmp into item i of field ("makernugget" &((i/maxnug)+1))
  19. --    put "done " & i && ("makernugget" &((i/maxnug)+1))
  20. --    set the itemdelimiter = ","
  21. --    
  22. --  end repeat
  23. --  
  24. --  
  25. --end
  26.  
  27. --on MakeNuggets
  28. --  global makernuggets
  29. --  
  30. --  set makernuggets = ""
  31. --  
  32. --  repeat with i = 1 to 188
  33. --    set tmp = the number of cast (i && "script") 
  34. --    if tmp > 0 then
  35. --      set nug = line 6 of field tmp
  36. --      set nug2 = ""
  37. --      
  38. --      set the itemdelimiter = "#"
  39. --      set nugnum = the number of items of nug
  40. --      repeat with j = 1 to nugnum
  41. --        put (return & item j of nug) into item j of nug2
  42. --      end repeat
  43. --      
  44. --      set the itemdelimiter = "@"
  45. --      put nug2 into item i of makernuggets
  46. --      set the itemdelimiter = ","
  47. --      put "done " && i
  48. --    end if
  49. --    
  50. --  end repeat
  51. --  
  52. --  WriteNugget
  53. --end
  54. --
  55. --on writenugget
  56. --  global makernuggets
  57. --  
  58. --  set obj = fileio(mNew,"write",the pathname & "nuggets")
  59. --  put obj
  60. --  obj(mWriteString,makernuggets)
  61. --  obj(mDispose)
  62. --end